﻿using IntelligentAgriculture.Contracts.Dto.Input;
using IntelligentAgriculture.Contracts.Dto.Output;
using IntelligentAgriculture.Domain.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IntelligentAgriculture.Contracts.Interface.SheepFileModelInterface
{
    public interface ISheepFileModelService
    {
        /// <summary>
        /// 羊只档案列表
        /// </summary>
        /// <returns></returns>;
        Task<PageOutput<SheepfilemodelsOutput>> GetSheepfilemodels(SheepfilemodelInput input);
        /// <summary>
        /// 档案添加
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<int> AddSheepfilemodel(Sheepfilemodel sheepfile);
        /// <summary>
        /// 档案删除
        /// </summary>
        /// <param name="sheepfileId"></param>
        /// <returns></returns>
        Task<int> DeleteSheepFileModel(int sheepfileId);
        /// <summary>
        /// 档案反填
        /// </summary>
        /// <param name="sheepfileId"></param>
        /// <returns></returns>
        Task<SheepfileInfo> ListSheepfilemodel(int sheepfileId);
        /// <summary>
        /// 档案修改
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<int> UpdaSheepfilemodel(UpdaSheepfileModelInput input);
        /// <summary>
        /// 获取父和母的父母辈
        /// </summary>
        /// <param name="Queryable"></param>
        /// <param name="Ear"></param>
        /// <param name="level"></param>
        /// <returns></returns>
        Task<List<string>> GetEarTag(IQueryable<Sheepfilemodel> Queryable, string Ear, int level);
        /// <summary>
        /// 获取3代关系表
        /// </summary>
        /// <param name="sId">主键</param>
        /// <returns>返回三代关系表</returns>
        Task<List<string>> GetGenealogy(int sheepfileId);
        /// <summary>
        /// 判断羊只档案状态
        /// </summary>
        /// <param name="presentState"></param>
        /// <param name="sheepType"></param>
        /// <returns></returns>
        Task<IQueryable<Sheepfilemodel>> IsSexSheepfilemodel(int presentState, int sheepType);
		/// <summary>
		/// 根据耳号反填羊只档案
		/// </summary>
		/// <param name="id"></param>
		/// <returns></returns>
		Task<Sheepfilemodel> DteilSheepfilemodel(string eartag);
        /// <summary>
        /// 根据生长阶段和在场状态获取耳号
        /// </summary>
        /// <param name="presentState"></param>
        /// <param name="sheepType"></param>
        /// <param name="growthstage"></param>
        /// <returns></returns>

        Task<IQueryable<Sheepfilemodel>> GrothSheepfilemodel(int presentState, int sheepType, int growthstage);



        /// <summary>
        /// 根据繁殖状态和在场状态获取耳号
        /// </summary>
        /// <param name="presentState">在场状态</param>
        /// <param name="sheepType">羊只类型</param>
        /// <param name="reproductionState">繁殖状态</param>
        /// <returns>返回数据</returns>
        Task<IQueryable<Sheepfilemodel>> GetReproductionState(int presentState, int sheepType);



    }
}
